﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using nwrole.lib;

namespace nwrole.Supervisor {
    static class Program {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            if(args.Length > 0)
            {
                if(string.Compare(args[0], "install", true) == 0)
                {
                    nwrole.lib.Supervisor.InstallWinService();
                    nwrole.lib.Supervisor.StartWinService();
                    return;
                }
            }

            ServiceBase[] ServicesToRun;
            ServicesToRun = new ServiceBase[] 
			{ 
				new SupervisorService() 
			};
            ServiceBase.Run(ServicesToRun);
        }
    }
}
